package demo01Object;

public class demo01Zi {
    private String name;
    private int age;

    public demo01Zi() {
    }

    public demo01Zi(String name, int age) {
        this.name = name;
        this.age = age;
    }

    // idea自动重写生成的toString
//    @Override
//    public String toString() {
//        return "demo01Zi{" +
//                "name='" + name + '\'' +
//                ", age=" + age +
//                '}';
//    }


    // 修改后的toString方法
    @Override
    public String toString() {
        return "name='" + name + '\'' +
                ", age=" + age;
    }
}
